-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(backend): Add TTL Strategy in Workflow Spec for Post-Completion Cleanup #11352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a0bf7c1
to
723aabd
Compare
@@ -77,9 +77,19 @@ func (t *V2Spec) ScheduledWorkflow(modelJob *model.Job) (*scheduledworkflow.Sche | |||
} | |||
} | |||
|
|||
var pipeline_options argocompiler.Options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Camel casing required to stay consistent with golang variable definition standards - PipelineOptions
var obj interface{} | ||
if util.CurrentExecutionType() == util.ArgoWorkflow { | ||
obj, err = argocompiler.Compile(job, kubernetesSpec, nil) | ||
obj, err = argocompiler.Compile(job, kubernetesSpec, &pipeline_options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var obj interface{} | ||
if util.CurrentExecutionType() == util.ArgoWorkflow { | ||
obj, err = argocompiler.Compile(job, kubernetesSpec, nil) | ||
obj, err = argocompiler.Compile(job, kubernetesSpec, pipeline_options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
const ( | ||
pipeline_default_ttlSeconds = int32(30) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Camel casing :)
@@ -86,6 +91,11 @@ func Compile(jobArg *pipelinespec.PipelineJob, kubernetesSpecArg *pipelinespec.S | |||
} | |||
} | |||
|
|||
pipeline_ttlseconds := pipeline_default_ttlSeconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Camel casing here too
@@ -300,9 +310,19 @@ func (t *V2Spec) RunWorkflow(modelRun *model.Run, options RunWorkflowOptions) (u | |||
} | |||
} | |||
|
|||
var pipeline_options *argocompiler.Options | |||
for _, platform := range t.platformSpec.Platforms { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be doing a nil check on Platforms cc @rimolive
bfe79cc
to
f0befb9
Compare
/reopen |
@rimolive: Reopened this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: VaniHaripriya <vmudadla@redhat.com>
/close Closing in favor of #11802 |
@rimolive: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Description of your changes:
**This PR should be merged only after #11758
Testing Instruxtions:
main.yaml
file from herePipeline Spec
tab if the following snippet is present:Workflow
CR:Checklist: